
def bubblesort(nums):
    for i in range(len(nums)):
        for j in range(len(nums)-1):
            if nums[j] > nums[j+1]:
                nums[j], nums[j + 1] = nums[j + 1], nums[j]
    return nums
nums = [3,123,34,43,0,3,6,8]

print(bubblesort(nums))
